package driver.nxt.action;

import driver.actions.Action;
import driver.exceptions.ExecuteException;
import driver.nxt.NXTController;

/**
 * Closes the grabber at the front of the NXT
 *
 * @author David Martin
 */
public class NXTCloseGrabberAction extends Action
{

  private static final String ACTION_NAME = "Close Grabber";
  private NXTController controller;

  /**
   *
   * @param controller the NXT controller object
   */
  public NXTCloseGrabberAction(NXTController controller)
  {
    this.controller = controller;
  }

  public String getActionName()
  {
    return ACTION_NAME;
  }

  /**
   * Close the grabber by manipulating the grabber motor
   *
   * @throws driversuite.exceptions.ExecuteException
   */
  public void execute() throws ExecuteException
  {
    controller.closeGrabber();
  }
}

